package com.cupcorn.balapkarung;

import org.andengine.engine.options.ScreenOrientation;

import com.cupcorn.ads.Tapjoy;
import com.cupcorn.balapkarung.state.StateAbout;
import com.cupcorn.balapkarung.state.StateAchievment;
import com.cupcorn.balapkarung.state.StateGameOver;
import com.cupcorn.balapkarung.state.StateGamePlay;
import com.cupcorn.balapkarung.state.StateHighscore;
import com.cupcorn.balapkarung.state.StateHighscoreOnline;
import com.cupcorn.balapkarung.state.StateMainMenu;
import com.cupcorn.balapkarung.state.StateOption;
import com.cupcorn.balapkarung.state.StateShop;
import com.cupcorn.lib.game.GameEngine;
import com.cupcorn.lib.game.element.ElementSound;
import com.cupcorn.lib.game.element.GameElementFont;
import com.cupcorn.lib.game.element.GameElementState;

public class MainActivity extends GameEngine implements GameDefine, GameDefineText
{
	protected void gameInit()
	{
		Tapjoy.init(this);
	}
	
	protected void gamePause()
	{
		Tapjoy.pause();
	}
	
	protected void gameResume()
	{
		Tapjoy.resume();
	}
	
	GameElementState	elementState[]	=
	{
		new GameElementState(new StateMainMenu(this), false, true, true, true, true, false, STATE_MAIN_MENU, STATE_ACHIEVMENT, STATE_SHOP, STATE_HIGHSCORE, STATE_OPTION, STATE_GAME_PLAY, STATE_GAME_OVER, STATE_HIGHSCORE_ONLINE, STATE_ABOUT),
		new GameElementState(new StateAchievment(this), false, true, true, true, true, false),
		new GameElementState(new StateShop(this), false, true, true, true, true, false),
		new GameElementState(new StateHighscore(this), false, true, true, true, true, false),
		new GameElementState(new StateOption(this), false, true, true, true, true, false),
		new GameElementState(new StateGamePlay(this), false, true, true, true, true, false),
		new GameElementState(new StateGameOver(this), false, true, true, true, true, false),
		new GameElementState(new StateHighscoreOnline(this), false, true, true, true, true, false),
		new GameElementState(new StateAbout(this), false, true, true, true, true, false),
	};
	
	protected ScreenOrientation gameOrientation()
	{
		return ScreenOrientation.LANDSCAPE_FIXED;
	}
	
	protected GameElementState[] gameState()
	{
		return elementState;
	}
	
	protected GameElementFont[] gameFont()
	{
		return FONT;
	}

	protected ElementSound[] gameMusic() 
	{
		return GAME_MUSIC;
	}

	protected ElementSound[] gameSound() 
	{
		return GAME_SOUND;
	}
}
